using System;
using System.Configuration;

namespace Systepic.Projects
{
	/// <summary>
	/// A strongly typed definition of a configuration
	/// specified in the app.config or web.config file.
	/// </summary>
	public class ProjectsConfiguration : ConfigurationSection
	{
		/// <summary>
		/// All of the configurations specified
		/// in the configuration file.
		/// </summary>
		[ConfigurationProperty("providers")]
		public ProviderSettingsCollection Providers
		{
			get
			{
				return (ProviderSettingsCollection)base["providers"];
			}
		}

		/// <summary>
		/// The property defaultProvider that specifies
		/// which provider should be used in the
		/// list of providers.
		/// </summary>
		[ConfigurationProperty("defaultProvider",
			DefaultValue = "SqlProjectsProvider")]
		[StringValidator(MinLength = 1)]
		public string DefaultProvider
		{
			get { return (string)base["defaultProvider"]; }
		}
	}
}
